home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
163_01
/
getw.c
< prev
next >
Wrap
Text File
|
1988-01-30
|
512b
|
14 lines
/*
** get a word from the stream
*/
#define FILE int
#include "streamio.h"
extern fgetc();
getw(stream) FILE *stream; {
char hi, lo;
if((hi=fgetc(stream)) == EOF) return EOF;
if((lo=fgetc(stream)) == EOF) return EOF;
return (hi << 8) & (lo & 255);
}